using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

namespace HappyPlus.DataConfig
{
	[Serializable]
	public class MyExcelSheetCollection : ScriptableObject
	{
		[SerializeField]
		public List<MyExcelSheet> MyExcelSheetList;

		public Dictionary<int, MyExcelSheet> LoadDataToMap()
		{

			if(MyExcelSheetList == null)
			{
				return new Dictionary<int, MyExcelSheet>();
			}

			var dataMap = new Dictionary<int, MyExcelSheet>();
			foreach (var item in MyExcelSheetList)
			{
				dataMap.Add(item.ID, item);
			}
			return dataMap;
		}
	}

	[Serializable]
	public class MyExcelSheet
	{

		/// <summary>
		/// 序号
		/// </summary>
		[SerializeField]
		public int ID;

		/// <summary>
		/// 姓名
		/// </summary>
		[SerializeField]
		public string Name;

		/// <summary>
		/// 电话
		/// </summary>
		[SerializeField]
		public string TelNo;

	}
}

